import 'package:flutter/material.dart';

class TestUri extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    String url = "dkwidget://app/oh/haha/hehe?pa=1&pb=2";
    Uri uri = Uri.tryParse(url);
    return Scaffold(
      appBar: AppBar(
        elevation: 0.0,
        title: Text('我是主界面'),
      ),
      body: Column(
        children: <Widget>[
          Text(uri.scheme),
          Text(uri.host),
          Text(uri.path),
          Text(uri.queryParameters.toString()),
        ],
      ),
    );
  }
}
